import java.util.Scanner;

/**
 * Created by IntelliJ IDEA.
 * User: anubhav
 * Date: 1/4/14
 * Time: 3:02 AM
 * To change this template use File | Settings | File Templates.
 */
public class GenerateFactors {
    
    public static void main(String[] args){
        
        Scanner in=new Scanner(System.in);
        int num=in.nextInt();
        int newNum=1;
        for(int i=2;i<=num/2 && newNum<num;i++){
             if(num%i == 0){
                 System.out.println(i);
                 newNum = newNum * i;
             }
            
        }
    }
    
}
